import Layout from '@/pages/public/layout' // 公共部分

const mall = [{
  path: '/mall',
  component: Layout,
  children: [{
    path: 'product/list',
    component: () => import('@/pages/mall/product/list.vue'),
    meta: {
      title: '商品列表',
      permission: 'mall.product.list'
    }
  }, {
    path: 'product/category',
    component: () => import('@/pages/mall/product/category.vue'),
    meta: {
      title: '商品分类',
      permission: 'mall.product.category'
    }
  }, {
    path: 'product/create',
    component: () => import('@/pages/mall/product/create.vue'),
    meta: {
      title: '创建商品',
      permission: 'mall.product.list.create'
    }
  }, {
    path: 'product/:id/edit',
    component: () => import('@/pages/mall/product/edit.vue'),
    meta: {
      title: '编辑商品',
      permission: 'mall.product.list.edit'
    }
  }, {
  //   path: 'order/list',
  //   component: () => import('@/pages/mall/order/list.vue'),
  //   meta: {
  //     title: '订单列表',
  //     permission: 'mall.order.list'
  //   }
  // }, {
  //   path: 'order/:order_no/detail',
  //   component: () => import('@/pages/mall/order/detail.vue'),
  //   meta: {
  //     title: '订单详情',
  //     permission: 'mall.order.list.detail'
  //   }
  // }, {
    path: 'order/:order_no/detail',
    component: () => import('@/pages/mall/order/detail.vue'),
    meta: {
      title: '订单详情',
      permission: 'finance.order.goods.detail'
      // permission: 'mall.order.list.detail'
    }
  }, {
    path: 'address/list',
    component: () => import('@/pages/mall/address/list.vue'),
    meta: {
      title: '地址列表',
      permission: 'mall.address.list'
    }
  }]
}]

export default mall
